using System;
namespace Me.Prettyprint.Hector.Api.Exceptions
{
	/// <summary>
	/// Designed to loosely wrap TApplicationException which can be generated 
    /// by Apache Cassandra under a variety of ambiguous conditions - some of
    /// them transient, some of them not. 
	/// </summary>
	[Serializable]
	public class HCassandraInternalException:HectorException
	{
		private int type;
		private const string ERR_MSG = "Cassandra encountered an internal error processing this request: ";
		
		public HCassandraInternalException(string msg):base(ERR_MSG + msg)
		{
		}

        virtual public int Type
        {
            get
            {
                return type;
            }

        }

        public HCassandraInternalException(int type, string msg)
            : base(ERR_MSG + "TApplicationError type: " + type + " message:" + msg)
		{
			this.type = type;
		}
		
		public HCassandraInternalException(string s, System.Exception t):base(ERR_MSG + s, t)
		{
		}
		
		public HCassandraInternalException(System.Exception t):base(t)
		{
		}
	}
}